package com.daykw.wenshu.utils;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

import org.nutz.dao.entity.Record;

public class IPPoolMap {

	private static BlockingQueue<Record> aqueue = new ArrayBlockingQueue<Record>(2000);

	
	public static BlockingQueue<Record> getAqueue() {
		return aqueue;
	}

	public static void removeIp(String ips) {
		try {
			EhcacheUtils.getInstance().putCache(ips, ips);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

	// public static ConcurrentMap<String, Ips> getQueue() {
	// return queue;
	// }
	//
	// public static Ips getIp() {
	// if (queue.keySet().size() > 0) {
	// String[] keys = queue.keySet().toArray(new String[0]);
	// Random random = new Random();
	// String randomKey = keys[random.nextInt(keys.length)];
	// Ips val = queue.get(randomKey);
	// return val;
	// } else {
	// return null;
	// }
	//
	// }

}
